package com.jinandi.app.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * <机构>
 * 
 * @author CGC
 * @version [记录版本号, 2013-5-10]
 */
@Entity
@Table(name = "JND_ORGANIZATION")
public class Organization extends ManagedIdentityDomainObject<Organization> {

	private static final long serialVersionUID = -2473718347098884488L;

	private String cn; // 机构的cn

	private String path;// 路径

	private String name; // 机构名称

	private Long pid;// 父ID
	
	private Boolean isParent = true;
	
	@Transient
	public Boolean getIsParent() {
		return isParent;
	}

	public void setIsParent(Boolean isParent) {
		this.isParent = isParent;
	}

	@Column(name = "cn", nullable = false, unique = true)
	public String getCn() {
		return cn;
	}

	public void setCn(String cn) {
		this.cn = cn;
	}

	@Column(name = "path", nullable = false, unique = true)
	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	@Column(name = "name", nullable = false, unique = false)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "pid", nullable = true, unique = false)
	public Long getPid() {
		return pid;
	}

	public void setPid(Long pid) {
		this.pid = pid;
	}

}
